package com.xingchen.loveparttimejob.model.pojo;

import java.sql.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * @author lwj
 * @date 2024-12-03
 * @vesion 1.0.0
 */
public class PartTimeType {
    /**
     * 类型编号
     */
    private int pttId;
    /**
     * 类型名称
     */
    private String pttName;
    /**
     * 兼职类型
     */
    private int jobType;
    /**
     * 用户编号（外键）
     */
    private int uId;
    /**
     * 指向当前类型编号
     */
    private int previousMenu;
    /**
     * 创建时间
     */
    private Date createTime;
    /**
     * 是否删除
     */
    private int state;

    // 构造方法
    public PartTimeType() {}
    public PartTimeType(int pttId, String pttName, int jobType, int uId, int previousMenu, Date createTime, int state) {
        this.pttId = pttId;
        this.pttName = pttName;
        this.jobType = jobType;
        this.uId = uId;
        this.previousMenu = previousMenu;
        this.createTime = createTime;
        this.state = state;
    }

    /**
     * 反射中使用到
     * @return
     */
    public Map<String,String> getMapping(){
        Map<String,String> map = new HashMap<>();
        map.put("pttId","ptt_id");
        map.put("pttName","ptt_name");
        map.put("jobType","job_type");
        map.put("uId","u_id");
        map.put("previousMenu","previous_menu");
        map.put("createTime","create_time");
        map.put("state","state");
        return map;
    }

    // 属性
    public int getPttId() {
        return pttId;
    }

    public void setPttId(int pttId) {
        this.pttId = pttId;
    }

    public String getPttName() {
        return pttName;
    }

    public void setPttName(String pttName) {
        this.pttName = pttName;
    }

    public int getJobType() {
        return jobType;
    }

    public void setJobType(int jobType) {
        this.jobType = jobType;
    }

    public int getuId() {
        return uId;
    }

    public void setuId(int uId) {
        this.uId = uId;
    }

    public int getPreviousMenu() {
        return previousMenu;
    }

    public void setPreviousMenu(int previousMenu) {
        this.previousMenu = previousMenu;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    /**
     * 打印兼职类型表
     * @return
     */
    @Override
    public String toString() {
        return "PartTimeType{" +
                "pttId=" + pttId +
                ", pttName='" + pttName + '\'' +
                ", jobType=" + jobType +
                ", uId=" + uId +
                ", previousMenu=" + previousMenu +
                ", createTime=" + createTime +
                ", state=" + state +
                '}';
    }
}
